<?php
/**
 * Created by PhpStorm.
 * User: root
 * Date: 19-3-3
 * Time: 上午10:27
 */
namespace app\wx_api\ext\auth;

/**
 * 服务端的签名抽象接口类，用于规范和指导用户重写签名实现
 * 重写签名，实现该类即可
 *
 * Class SignAbstract
 * @package app\wx_api\ext\auth
 */
Abstract class SignAbstract {

    const EXPIRED_TIME = 60;
    public $err_msg = null;
    /**
     * validate sign
     * @param array $data
     * @return bool
     */
    public Abstract function check($data);

    /**
     * 生成服务端的签名
     *
     * @param array $data
     * @return false|string $sign
     */
    protected Abstract function generateSign($data);

}